import request from '@/utils/request'

// 查询订单管理-vv列表
export function listOrder(query) {
  return request({
    url: '/orders/order/list',
    method: 'get',
    params: query
  })
}
export function listProduct() {
  return request({
    url: '/system/product1/product',
    method: 'get'
  })
}
export function listKind() {
  return request({
    url: '/orders/kind/list',
    method: 'get'
  })
}


export function gProvinces(provinceCode) {
  return request({
    url: '/orders/order/listProvinces',
    method: 'get',
    params: provinceCode
  })
}
export function gCities() {
  return request({
    url: '/orders/order/listCities',
    method: 'get'
  })
}

// 查询订单管理-vv详细
export function getOrder(orderId) {
  return request({
    url: '/orders/order/' + orderId,
    method: 'get'
  })
}
export function selectLast10DaysOrderCount() {
  return request({
    url: '/orders/order/stats/last10days',
    method: 'get'
  })
}

// 新增订单管理-vv
export function addOrder(data) {
  return request({
    url: '/orders/order',
    method: 'post',
    data: data
  })
}

// 修改订单管理-vv
export function updateOrder(data) {
  return request({
    url: '/orders/order',
    method: 'put',
    data: data
  })
}

// 删除订单管理-vv
export function delOrder(orderId) {
  return request({
    url: '/orders/order/' + orderId,
    method: 'delete'
  })
}
